package com.app.utils;

import android.content.Context;
import android.widget.Toast;

import com.app.application.QXApplication;


/**
 * 提示信息的管理
 */

public class PromptManager {

	static Toast toast;
	public static void showToast(Context context, String msg) {
		if(toast == null){
			toast = Toast.makeText(context, msg, Toast.LENGTH_SHORT);
		}else{
			toast.setText(msg);
		}
		toast.show();
	}

	public static void showToast(Context context, int msgResId) {
		if(toast == null){
			toast = Toast.makeText(context, msgResId, Toast.LENGTH_SHORT);
		}else{
			toast.setText(msgResId);
		}
		toast.show();
	}
	
	public static void showToast(int msgResId){
		showToast(QXApplication.getContext(), msgResId);
	}
	
	public static void showToast(String msg) {
		showToast(QXApplication.getContext(), msg);
	}

}
